//
//  JackConstants.h
//  JackProduct
//
//  Created by Pei on 15/11/6.
//  Copyright © 2015年 Xiaobo Pei. All rights reserved.
//

#ifndef JackConstants_h
#define JackConstants_h

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "AppDelegate.h"

#import "JackTool.h"

#import "YMUtil.h"
#import "YMNetLib.h"
#import "YMNetDataUtil.h"
#import "YMUIUtil.h"


//TabBar
#define kViewController @"ViewController"
#define kNormalImage @"Normal"
#define kSelectedImage @"Selected"

#ifndef kAppVersion
#define kAppVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
#endif

#ifndef kAppName
#define kAppName [[[NSBundle mainBundle] localizedInfoDictionary] objectForKey:@"CFBundleDisplayName"]
#endif


#define kStr(str) NSLocalizedString(str, nil)


#define kAppFont(size) [UIFont systemFontOfSize:size]
#define kAppFontBold(size) [UIFont boldSystemFontOfSize:size]



#define kAPPDelegate ((AppDelegate *)([UIApplication sharedApplication].delegate))

//数据存储
#define Login_Status @"Login_Status_YesOrNo"  //是否登录，或者退出
#define Mine_Update_UserInfo @"Mine_Update_UserInfo" //我的同步信息
#define Check_Type_Items @"Check_Type_Items" //检查类型
#define Dic_AuditState @"Dic_AuditState"//检查内容审批状态
#define Select_Major @"Select_Major"  //专业
#define select_RiskLevel @"select_RiskLevel"  //隐患级别
#define Dic_RiskType @"Dic_RiskType" //RiskType  检查项隐患类型
#define Dic_ProjectState @"Dic_ProjectState" //关键工序施工状态

#define Dic_RepairRecordState @"Dic_RepairRecordState" //检查内容整改状态


#define Select_ProjectState @"ProjectState" //

#define WriteDetail_Task @"WriteDetail_Task" //填写详情

#define Create_Task @"Create_Task_UserDefault"

#define GuanJianGongXu_Save @"GuanJianGongXu_Save"

#define ShiTiQKCJ_Save @"ShiTiQKCJ_Save"

#define ToBeChangeTask_Save @"ToBeChangeTask_Save"


#define User_Default @"User_Default"
#define User_Info @"User_Info"

#define User_Privilege_Default @"User_Privilege_Default"


//生成单例
#define SYNTHESIZE_SINGLETON_FOR_CLASS(classname) \
\
static classname *shared##classname = nil; \
\
+ (classname *)getInstance \
{ \
@synchronized(self) \
{ \
if (shared##classname == nil) \
{ \
shared##classname = [[self alloc] init]; \
} \
} \
\
return shared##classname; \
} \
\
+ (id)allocWithZone:(NSZone *)zone \
{ \
@synchronized(self) \
{ \
if (shared##classname == nil) \
{ \
shared##classname = [super allocWithZone:zone]; \
return shared##classname; \
} \
} \
\
return nil; \
} \
\
- (id)copyWithZone:(NSZone *)zone \
{ \
return self; \
}

#endif /* JackConstants_h */
